<?php


namespace api\home\validata;


use think\Validate;

class UserValidata extends Validate
{
    protected $rule = [
        'name' => 'require|max:20',
        'mobile' => 'require|max:20'
    ];

    protected $message = [
        'name.require' => '用户名称不能为空',
        'name.max' => '用户名格式不符',
        'mobile.require' => '电话不能为空',
        'mobile.max' => '电话格式不符',
    ];

    protected $scene = [
        'register' => ['name','mobile']
    ];
}